package model

import "gorm.io/gorm"

// 权限
type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(50)"`
}

type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(50)"`
}

type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(50)"`
}

// 车辆交易
type Car struct {
	gorm.Model
	CarON    string `gorm:"type:varchar(50)"`
	CarName  string `gorm:"type:varchar(50)"`
	CarPrice int    `gorm:"type:int"`
}

type CarOrder struct {
	gorm.Model
	OrderON   string `gorm:"type:varchar(50)"`
	OrderFrom string `gorm:"type:varchar(50)"`
	OrderTo   string `gorm:"type:varchar(50)"`
	OrderGood string `gorm:"type:varchar(50)"`
	Cid       int    `gorm:"type:int"`
}

type CarOrderList struct {
	OrderId   int    `gorm:"type:int"`
	CarON     string `gorm:"type:varchar(50)"`
	CarName   string `gorm:"type:varchar(50)"`
	CarPrice  int    `gorm:"type:int"`
	OrderON   string `gorm:"type:varchar(50)"`
	OrderFrom string `gorm:"type:varchar(50)"`
	OrderTo   string `gorm:"type:varchar(50)"`
	OrderGood string `gorm:"type:varchar(50)"`
}

// 车辆信息
type BigCar struct {
	gorm.Model
	CarON    string `gorm:"type:varchar(50)"`
	CarName  string `gorm:"type:varchar(50)"`
	CarPrice int    `gorm:"type:int"`
	Tid      int    `gorm:"type:int"`
}

type BigCarOrder struct {
	gorm.Model
	OrderON   string `gorm:"type:varchar(50)"`
	OrderFrom string `gorm:"type:varchar(50)"`
	OrderTo   string `gorm:"type:varchar(50)"`
	OrderGood string `gorm:"type:varchar(50)"`
	Bid       int    `gorm:"type:int"`
}

type BigCatType struct {
	gorm.Model
	TypeNo   string `gorm:"type:varchar(50)"`
	TypeName string `gorm:"type:varchar(50)"`
	TypeDesc string `gorm:"type:varchar(50)"`
}

type BigCarOrderList struct {
	OrderId   int    `gorm:"type:int"`
	CarON     string `gorm:"type:varchar(50)"`
	CarName   string `gorm:"type:varchar(50)"`
	CarPrice  int    `gorm:"type:int"`
	OrderON   string `gorm:"type:varchar(50)"`
	OrderFrom string `gorm:"type:varchar(50)"`
	OrderTo   string `gorm:"type:varchar(50)"`
	OrderGood string `gorm:"type:varchar(50)"`
}

type BigCarTypeList struct {
	Cid      int    `gorm:"type:int"`
	CarON    string `gorm:"type:varchar(50)"`
	CarName  string `gorm:"type:varchar(50)"`
	CarPrice int    `gorm:"type:int"`
	TypeNo   string `gorm:"type:varchar(50)"`
	TypeName string `gorm:"type:varchar(50)"`
	TypeDesc string `gorm:"type:varchar(50)"`
}

// 车辆合同
type CarCon struct {
	gorm.Model
	CarON   string `gorm:"type:varchar(50)"`
	CarName string `gorm:"type:varchar(100)"`
	CarCode string `gorm:"type:varchar(50)"`
}

type CarContract struct {
	gorm.Model
	TractCode string `gorm:"type:varchar(50)"`
	TractName string `gorm:"type:varchar(50)"`
	Cid       int    `gorm:"type:int"`
}

type CarContractList struct {
	Tid       int    `gorm:"type:int"`
	TractCode string `gorm:"type:varchar(50)"`
	TractName string `gorm:"type:varchar(50)"`
	CarON     string `gorm:"type:varchar(50)"`
	CarName   string `gorm:"type:varchar(100)"`
	CarCode   string `gorm:"type:varchar(50)"`
}
